<?php
/**
 * Reference Block of an expense
 * To attach the expense to a reference (object,cost center...)
 * 
 */

use Fox\Generator;
use Fox\Common\Accounting\Currency;
use Fox\Html\Input;
use Fox\Dao\SqlFragment;
use Hive\Expense\Type;
use Fox\Html\DropList;
use Hive\Expense;

$xview = Xview::instance();

$block = new Fox\Html\Block('bDetail',MSG(Expense::MSGCL,3));
$finder = new Currency();
$currencies = $finder->find();
// Amount
$block->add(new Input(array('expense_amount','amount'),true))
		->add(new DropList(array('expense_currency','currency'),false))	// Currency
			->options($currencies,'isocode','isocode');
$block->item('amount')->item('currency')->label(null,true);
// TVA Rate ?
//@TODO ?
// TVA Amount ?
//@TODO ?
return $block;